<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>存款</title>
    <link rel="stylesheet" type="text/css" href="/css/basic.css"/>
    <link rel="stylesheet" type="text/css" href="/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="/css/center.css"/>
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css"/>
</head>
<body>
<div th:fragment="deposit">
    <style>
        /* Dialog弹窗样式 */
        .dialog {
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            position: fixed;
            display: -webkit-flex;
            display: flex;
            -webkit-align-items: center;
            align-items: center;
            -webkit-justify-content: center;
            justify-content: center;
            pointer-events: none;
            z-index: 1000;
        }

        .dialog::before {
            content: '';
            position: absolute;
            width: 100%;
            height: 100%;
            left: 0;
            top: 0;
            background: rgba(0, 0, 0, 0.6);
            opacity: 0;
            -webkit-transition: opacity 0.3s;
            transition: opacity 0.3s;
            -webkit-backface-visibility: hidden;
        }

        .dialog--open::before {
            opacity: 1;
            pointer-events: auto;
        }

        .dialog--open .dialog__content {
            opacity: 1;
            pointer-events: auto;
            -webkit-transition: opacity 0.3s;
            transition: opacity 0.3s;
            border-radius: 10px;
            overflow: hidden;
        }

        .dialog__content {
            width: 50%;
            max-width: 480px;
            min-width: 290px;
            position: relative;
            z-index: 5;
            opacity: 0;
        }

        .dialogtrade .dialog__content {
            max-width: 600px;
        }

        .dialogtrade .mover {
            pointer-events: none;
        }

        .dialog__content-inner {
            background: #fff;
            position: relative;
            width: 100%;
            height: 100%;
            text-align: center;
            overflow: hidden;
            opacity: 0;
            -webkit-transform: translate3d(0, 450px, 0);
            transform: translate3d(0, 450px, 0);
        }

        .dialog--open .dialog__content-inner {
            opacity: 1;
            -webkit-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
            -webkit-transition: opacity 0.3s, -webkit-transform 0.6s cubic-bezier(0.2, 1, 0.3, 1);
            transition: opacity 0.3s, transform 0.6s cubic-bezier(0.2, 1, 0.3, 1);
        }

        .dialog__header {
            color: #333;
            padding: 20px 35px;
            text-align: left;
            font-size: 18px;
        }

        .dialog__header h2 {
            font-size: 1.15em;
            margin: 0;
            line-height: 1.75;
            text-align: center;
            font-weight: normal;
        }

        .dialogtrade .action {
            background: none;
            padding: 0;
            margin: 0;
            border: none;
            display: block;
            position: relative;
            overflow: hidden;
            text-align: left;
            color: #201c1c;
            pointer-events: auto;
        }

        .dialogtrade .action--close {
            position: absolute;
            top: 10px;
            right: 20px;
            color: #333;
            font-size: 34px;
            z-index: 1000;
            cursor: pointer;
        }

        .dialogtrade .action--close:hover {
            color: #999;
        }

        .dialogtrade em, .dialogtrade i {
            font-style: normal;
        }

        .dialogtrade .actions {
            padding: 10px 30px;
            background: #fff;
            overflow: hidden;
        }

        .dialogtrade .mover__element {
            display: inline-block;
        }

        .dialogtrade .actions .action {
            opacity: 0;
            -webkit-transform: translate3d(0, 100px, 0);
            transform: translate3d(0, 100px, 0);
        }

        .dialog--open .actions .action {
            opacity: 1;
            -webkit-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
            -webkit-transition: opacity 0.3s, -webkit-transform 1s cubic-bezier(0.2, 1, 0.3, 1);
            transition: opacity 0.3s, transform 1s cubic-bezier(0.2, 1, 0.3, 1);
        }

        .dialog--open .actions div:first-child .action {
            -webkit-transition-delay: 0.07s;
            transition-delay: 0.07s;
        }

        .dialogtrade .binding_cont {
            width: 100%;
            float: left;
            padding-top: 40px;
        }

        .dialogtrade .binding_cont {
            padding: 0px;
            font-size: 18px;
        }

        .dialogtrade .binding_cont li, .dialogtrade .binding_cont li.binding_butt, #dialog-trade .binding_cont {
            width: 540px;
            text-align: center;
            padding-bottom: 12px;
        }

        .dialogtrade img {
            vertical-align: top;
            border: 0;
        }

        .dialogtrade strong {
            font-size: 20px;
        }

        .dialogtrade strong {
            font-weight: bold;
        }

        .dialogtrade span {
            color: #999;
        }

        .binding_cont li.binding_butt {
            width: 700px;
            float: left;
            padding-top: 30px;
            text-align: center;
        }

        .dialogtrade li {
            list-style-type: none;
        }

        .btnblue130, .table_main .btn-primary {
            width: 130px;
            height: 36px;
            background: url(/images/btn_spirits.png) no-repeat 0 -361px;
            display: inline-block;
            text-align: center;
            line-height: 34px;
            font-size: 15px;
            color: #FFF;
            border: none;
            cursor: pointer;
        }

        .dialogtrade .btndigtr2 {
            margin-left: 50px;
            background-position: 0 -397px;
        }

        .btnblue130:hover, .table_main .btn-primary:hover {
            background-position: 0 -325px;
            color: #FFF;
        }
    </style>
    <div class="ck_nr">

        <div class="as_fl20">
            <h3 class="as_fl20_h3">选择存款方式:</h3>
            <div class="as_cn">

                <!-- 在线方式 -->
                <div th:class="${iterStat.first}?'as_triangle_down zx_icon':'as_triangle_down'"
                     th:if="${depositChannelList.onlineType}"
                     th:each="item,iterStat:${depositChannelList.onlinePayData}">
                    <a class="as_info" th:text="${item.depositName}"></a>
                </div>

                <!-- 离线方式 -->
                <div th:class="${depositChannelList.onlineType} ? 'as_triangle_down': 'as_triangle_down zx_icon'"
                     th:if="${depositChannelList.offlineType}">
                    <a class="as_info">ATM/柜台/网银转账</a>
                </div>

                <!-- 支付宝方式 -->
                <div th:class="${depositChannelList.offlineType}?'as_triangle_down':'as_triangle_down zx_icon'"
                     th:if="${depositChannelList.alipayType}"
                     th:each="item,iterStat:${depositChannelList.alipayPayData}">
                    <a class="as_info" th:text="${item.depositName}"></a>
                </div>

                <!-- 微信方式 -->
                <div th:class="${depositChannelList.alipayType}?'as_triangle_down':'as_triangle_down zx_icon'"
                     th:if="${depositChannelList.wechatType}"
                     th:each="item,iterStat:${depositChannelList.wechatPayData}">
                    <a class="as_info" th:text="${item.depositName}"></a>
                </div>

            </div>
        </div>

        <div class="as_fr80">
            <!-- 在线方式内容 -->
            <div class="deposit_not_available"
                 th:style="${iterStat.first}?'display:block;text-align: left;':'display:none;text-align: left;'"
                 th:if="${depositChannelList.onlineType}"
                 th:each="item,iterStat:${depositChannelList.onlinePayData}">
                <form th:id="'depositFrom' + ${item.depositChannelId}">
                    <!-- 在线 -->
                    <div class="fastpay_box" style="padding-bottom: 50px;">

                        <div class="tk_jr fl">
                            <span class="text fs14 w100 tar" style="color:#000;">存款金额：</span>
                            <span class="input">
                                <input name="ctl01" type="text" name="depositMoney" placeholder="金额"
                                       class="r_inptut inputwd300 deposit-money" maxlength="8"/>
                            </span>
                        </div>

                        <div class="tk_ts m20b">
                            <span class="text">
                                <img style="margin:0px; margin-right:10px;" src="images/ico24.png"/>
                                存款每次最低50
                            </span>
                        </div>
                        <div class="tk_num clear m20t"><span><b>100</b><b>500</b><b>1000</b><b>2000</b></span></div>

                        <div class="tk_yh deposit_atmsel_icon" th:if="${item.depositType == 1}">
                            <span class="text fs14 w100 tar" style="color:#000;">选择银行：</span>
                            <span class="radio" id="bankList"></span>
                        </div>
                        <b class="morebank" data="hide" th:if="${item.depositType == 1}"></b>
                        <input name="bankCode" value="" hidden th:if="${item.depositType != 1}"/>
                        <input th:value="${item.depositChannelId}" hidden name="depositChannelId"/>
                        <div style="margin:0 auto">
                            <button type="button" style="margin-left:400px;"
                                    th:onclick="'javascript:submitDeposit('+${item.depositChannelId}+');'"
                                    class="as_but inputwd300">
                                立即存款
                            </button>
                        </div>
                    </div>
                </form>
            </div>

            <!-- 离线方式内容 -->
            <div class="deposit_not_available"
                 th:style="${depositChannelList.onlineType} ? 'display:none;text-align: left;' : 'display:block;text-align: left;'"
                 th:if="${depositChannelList.offlineType}">
                <!--<form th:id="'depositFromOffline'">
                    &lt;!&ndash; 离线 &ndash;&gt;
                    <div class="fastpay_box">
                        <div class="tit">
                            <h5>温馨提示:</h5>
                            <p>为方便您的存款尽快到账，建议您存款时在存款金额上添加尾数，例如：1000.68、1010等，同时，存款前请务必查看最新的存款银行账户。</p>
                        </div>
                        <input id="offlineDepositChannelId"
                               th:value="${depositChannelList.offlinePayData[0].depositChannelId}" hidden
                               name="depositChannelId"/>
                        &lt;!&ndash;<div id="bankSelectRow" class="tk_yh deposit_atmsel_icon">
                            <span class="text fs14 w100 tar"><b style="color:#000;">选择银行：</b></span>
                            <span class="radio">
                                  <label class="on">
                                    <input checked="" type="radio" name="radiogroup1" value="ICBC">
                                    <b><i class="deposit_atmsel_icon_i ICBC"><img></i>工商银行</b></label>
                                  <label>
                                    <input type="radio" name="radiogroup1" value="CCB">
                                    <b><i class="deposit_atmsel_icon_i CCB"><img></i>建设银行</b></label>
                                  <label>
                                    <input type="radio" name="radiogroup1" value="ABC">
                                    <b><i class="deposit_atmsel_icon_i ABC"><img></i>农业银行</b></label>
                                  <label>
                                    <input type="radio" name="radiogroup1" value="BOC">
                                    <b><i class="deposit_atmsel_icon_i BOC"><img></i>中国银行</b></label>
                                  <label>
                                    <input type="radio" name="radiogroup1" value="POST">
                                    <b><i class="deposit_atmsel_icon_i POST"><img></i>中国邮政</b></label>
                                  <span class="otherbank" style="display: none;">
                                      <label>
                                        <input type="radio" name="radiogroup1" value="CMBC">
                                        <b><i class="deposit_atmsel_icon_i CMBC"><img></i>招商银行</b></label>
                                      <label>
                                        <input type="radio" name="radiogroup1" value="PINGAN">
                                        <b><i class="deposit_atmsel_icon_i PINGAN"><img></i>平安银行</b></label>
                                      <label>
                                        <input type="radio" name="radiogroup1" value="BOCO">
                                        <b><i class="deposit_atmsel_icon_i BOCO"><img></i>交通银行</b></label>
                                      <label>
                                        <input type="radio" name="radiogroup1" value="CMSB">
                                        <b><i class="deposit_atmsel_icon_i CMSB"><img></i>民生银行</b></label>
                                      <label>
                                        <input type="radio" name="radiogroup1" value="CEBB">
                                        <b><i class="deposit_atmsel_icon_i CEBB"><img></i>光大银行</b></label>
                                      <label>
                                        <input type="radio" name="radiogroup1" value="ECITIC">
                                        <b><i class="deposit_atmsel_icon_i ECITIC"><img></i>中信银行</b></label>
                                      <label>
                                        <input type="radio" name="radiogroup1" value="CIB">
                                        <b><i class="deposit_atmsel_icon_i CIB"><img></i>兴业银行</b></label>
                                      <label>
                                        <input type="radio" name="radiogroup1" value="GDB">
                                        <b><i class="deposit_atmsel_icon_i GDB"><img></i>广发银行</b></label>
                                      <label>
                                        <input type="radio" name="radiogroup1" value="HXB">
                                        <b><i class="deposit_atmsel_icon_i HXB"><img></i>华夏银行</b></label>
                                  </span>
                            </span>
                        </div>
                        <b class="morebank" style="background-image: url(/images/souqi.png);"></b>
                        &ndash;&gt;
                        <div class="input-bank01">
                            <div class="swiper-container clear">
                                <div class="tk_jr fl">
                                    <span class="text fs14 w100 tar"><b style="color:#000;">存款金额：</b></span>
                                    <span class="input">
                                        <input type="text" name="depositMoney" placeholder="金额"
                                               class="inputwd233 deposit_part" maxlength="8">
                                    </span>
                                </div>
                                <div class="offline_tk_ts "><span class="text"><img
                                        style="margin:0px; margin-right:10px;" src="/images/ico24.png">单笔转账限额50~100,001元</span>
                                </div>
                            </div>
                            <div class="swiper-container clear">
                                <div class="tk_jr fl"><span class="text fs14 w100 tar"><b
                                        style="color:#000;">存款人：</b></span>
                                    <span class="input"><input name="depositName" type="text" placeholder="存款人"
                                                               class="inputwd233 deposit_part" maxlength="8"></span>
                                </div>
                            </div>
                            <div class="swiper-container clear">
                                <div class="tk_jr fl"><span class="text fs14 w100 tar"><b style="color:#000;">银行账户：</b></span>
                                    <span class="input"><input name="depositAccount" type="text" placeholder="银行账户"
                                                               class="inputwd233 deposit_part" maxlength="8"></span>
                                </div>
                                <div class="offline_tk_ts "><span class="text"><img
                                        style="margin:0px; margin-right:10px;"
                                        src="images/ico24.png">只需后4位</span></div>
                            </div>
                            <div class="swiper-container clear">
                                <div class="tk_jr fl"><span class="text fs14 w100 tar"><b style="color:#000;">存款人银行：</b></span>
                                    <span class="input"><input name="depositBank" type="text" placeholder="汇款人银行"
                                                               class="inputwd233 deposit_part" maxlength="8"></span>
                                </div>
                                <div class="offline_tk_ts "><span class="text"><img
                                        style="margin:0px; margin-right:10px;"
                                        src="images/ico24.png">只需后4位</span></div>
                            </div>
                            <div class="swiper-container clear">
                                <div class="tk_jr fl ">
                                    <span class="text fs14 w100 tar "><b style="color:#000;">存款方式：</b></span>
                                    <span class="input re">
                                        <select name="depositType" class="deposit_part" style="width: 245px">
                                            <option value="网上银行">网上银行</option>
                                            <option value="ATM柜员机">ATM柜员机</option>
                                            <option value="现金柜台">现金柜台</option>
                                            <option value="其他">其他</option>
                                        </select>
                                        <i class="icon"></i>
                                    </span>
                                </div>
                            </div>
                            &lt;!&ndash;目标银行&ndash;&gt;
                            <div class="bank-wrapper">
                                <h5>目标银行：</h5>
                                <div class="bank-bg">
                                    <p class="re"><span class="name">选择银行：</span>
                                        <select id="acceptBankSel" name="acceptBank" class="inputwd180"
                                                style="width: 190px">
                                            <option th:value="${item.offlineBankName}"
                                                    th:each="item,iterStat:${depositChannelList.offlinePayData}"
                                                    th:text="${item.offlineBankName}"
                                                    th:attr="data-depositChannelId=${item.depositChannelId},data-accountName=${item.offlineAccountname},data-bankNo=${item.offlineBankNo}"></option>
                                        </select>
                                        <i class="icon"></i>
                                    </p>
                                    <p><span class="name">收款人：</span>
                                        <span class="input" id="acceptName"
                                              th:text="${depositChannelList.offlinePayData[0].offlineAccountname}">
                                            &lt;!&ndash;<input name="acceptName" type="text" class="inputwd180 ">&ndash;&gt;
                                        </span>
                                    </p>
                                    <p><span class="name">银行账号：</span>
                                        <span class="input" id="acceptAccount"
                                              th:text="${depositChannelList.offlinePayData[0].offlineBankNo}">
                                            &lt;!&ndash;<input name="acceptAccount" type="text" class="inputwd180 ">&ndash;&gt;
                                        </span>
                                    </p>
                                </div>
                                &lt;!&ndash;<div class="back"><a href="javascript:void(0)">返回</a></div>&ndash;&gt;
                            </div>
                        </div>
                        <div style="margin:0 auto">
                            <button type="button" style="margin-left:113px;"
                                    th:onclick="'javascript:submitOfflineDeposit();'"
                                    class="as_but  as_but1 inputwd300">离线存款
                            </button>
                        </div>
                    </div>
                </form>-->
                <form th:id="'depositFromOffline'">
                    <!-- 离线 -->
                    <div class="fastpay_box">
                        <div class="tit">
                            <h5>温馨提示:</h5>
                            <p>为方便您的存款尽快到账，建议您存款时在存款金额上添加尾数，例如：1000.68、1010等，同时，存款前请务必查看最新的存款银行账户。</p>
                        </div>
                        <input id="offlineDepositChannelId"
                               th:value="${depositChannelList.offlinePayData[0].depositChannelId}" hidden
                               name="depositChannelId"/>
                        <div class="input-bank01" style="height:370px;">
                            <div class="swiper-container clear">
                                <div class="tk_jr fl" style="margin-top:20px;">
                                <span class="text fs14 w100 tar fl" style="margin-right:8px;">
                                <b style="color:#000;">存款银行：</b></span>
                                    <span id="currtSelectBank" class="input fl"
                                          style="width:243px; height:40px; display:block;">
                                    <img style="margin:0; height:30px;border-radius: 5px; width:100%; height:100%;" src="/images/gsyh.jpg">
                                </span>
                                </div>
                            </div>

                            <div class="swiper-container clear">
                                <div class="tk_jr fl" style="margin-top:20px;">
                                <span class="text fs14 w100 tar">
                                    <b style="color:#000;">存款金额：</b>
                                </span>
                                    <span class="input">
                                    <input name="depositMoney" type="text" placeholder="存款金额"
                                           class="r_inptut inputwd300 deposit-money" maxlength="8">
                                </span>
                                </div>
                                <div class="tk_ts " style="margin-top:20px;">
                                <span class="text">
                                    <img style="margin:0px; margin-right:10px;" src="/images/ico24.png">单笔转账限额50~100.01元
                                </span>
                                </div>
                            </div>
                            <div class="swiper-container clear">
                                <div class="tk_jr fl" style="margin-top:20px;">
                                <span class="text fs14 w100 tar">
                                    <b style="color:#000;">存款人：</b>
                                </span>
                                    <span class="input">
                                    <input name="depositName" type="text" placeholder="存款人"
                                           class="r_inptut inputwd300 deposit-money" maxlength="8">
                                </span>
                                </div>
                            </div>
                            <div class="swiper-container clear">
                                <div class="tk_jr fl" style="margin-top:20px;">
                                <span class="text fs14 w100 tar">
                                    <b style="color:#000;">银行账户：</b>
                                </span>
                                    <span class="input">
                                    <input name="depositAccount" type="text" placeholder="银行账户"
                                           class="r_inptut inputwd300 deposit-money" maxlength="8">
                                </span>
                                </div>
                                <div class="tk_ts " style="margin-top:20px;">
                                <span class="text">
                                    <img style="margin:0px; margin-right:10px;" src="/images/ico24.png">只需后4位
                                </span>
                                </div>
                            </div>
                            <div class="swiper-container clear">
                                <div class="tk_jr fl" style="margin-top:20px;">
                                <span class="text fs14 w100 tar">
                                    <b style="color:#000;">汇款人银行：</b>
                                </span>
                                    <span class="input"><input name="depositBank" type="text" placeholder="汇款人银行"
                                                               class="r_inptut inputwd300 deposit-money" maxlength="8">
                                </span>
                                </div>
                                <div class="tk_ts " style="margin-top:20px;">
                                <span class="text">
                                    <img style="margin:0px; margin-right:10px;" src="/images/ico24.png">只需后4位
                                </span>
                                </div>
                            </div>
                            <div class="swiper-container clear">
                                <div class="tk_jr fl " style="margin-top:20px;">
                                <span class="text fs14 w100 tar ">
                                    <b style="color:#000;">汇款方式：</b>
                                </span>
                                    <span class="input re">
                                    <select name="depositType" id="depositMoney" style="width: 245px">
                                        <option value="网上银行">网上银行</option>
                                        <option value="ATM柜员机">ATM柜员机</option>
                                        <option value="现金柜台">现金柜台</option>
                                        <option value="其他">其他</option>
                                    </select>
                                    <i class="icon"></i>
                                </span>
                                </div>
                            </div>
                            <!--目标银行-->
                            <div class="bank-wrapper">
                                <h5>目标银行：</h5>
                                <div class="bank-bg" style="color:#000;">
                                <span style="display:block; height:42px;">
                                    <div class="name fl"
                                         style="display:inline-block; height:42px; line-height:42px; margin-top:10px; margin-left:20px;">选择银行：</div>
                                    <div class="htk01" style="display: block; float: left; margin-top:15px;">
                                        <!--<img id="blank_1" style="margin:0px; height:30px; margin-top:15px;" src="/images/gsyh.jpg">
                                        <img id="blank_2" style="margin:0px; height:30px; margin-top:15px; display:none;" src="/images/jsyh.png">-->
                                    </div>
                                    <div class="htk02" style="display: none; position:relative;">
                                        <select id="acceptBankSel" name="acceptBank" class="inputwd180"
                                                style="width: 190px; margin-top:15px;">
                                            <option th:value="${item.offlineBankName}"
                                                    th:each="item,iterStat:${depositChannelList.offlinePayData}"
                                                    th:text="${item.offlineBankName}"
                                                    th:attr="data-depositChannelId=${item.depositChannelId},data-accountName=${item.offlineAccountname},data-bankNo=${item.offlineBankNo}"></option>
                                        </select>
                                        <i class="icon" style="top:28px;"></i>
                                    </div>
                                </span>
                                    <div class="xxka01" id="payee_1">
                                        <p><span class="name">收款人：</span>
                                            <span id="acceptName" class="input"
                                                  th:text="${depositChannelList.offlinePayData[0].offlineAccountname}"></span>
                                        </p>
                                        <p><span class="name">银行账号：</span>
                                            <span id="acceptAccount" class="input"
                                                  th:text="${depositChannelList.offlinePayData[0].offlineBankNo}"></span>
                                        </p>
                                        <p><span class="name">银行地址：</span>
                                            <span class="input"
                                                  th:text="${depositChannelList.offlinePayData[0].offlineProvince}"></span>
                                        </p>
                                    </div>
                                </div>
                                <div class="back" style="width:375px; height:24px; margin:0px; color:#000;">
                                    <span id="slectBank" class="m20l select" style="cursor: pointer;">选择其他银行</span>
                                    <span id="selectBack" class="m20l" style="display: none;">
                                        <a class=" m20r fanhui" href="javascript:void(0);">返回</a>
                                    </span>
                                </div>
                            </div>
                        </div>
                        <div style="margin:0 auto; margin-top:10px;">
                            <button type="button" style="margin-left:113px;"
                                    th:onclick="'javascript:submitOfflineDeposit();'"
                                    class="as_but  as_but1 inputwd300">离线存款
                            </button>
                        </div>
                    </div>
                </form>
            </div>

            <!-- 支付宝方式内容 -->
            <div id="deposit_maintain" class="deposit_not_available"
                 th:style="${depositChannelList.offlineType} ? 'display:none;' : 'display:block;'"
                 th:if="${depositChannelList.alipayType}"
                 th:each="item,iterStat:${depositChannelList.alipayPayData}">
                <form th:id="'depositFrom' + ${item.depositChannelId}">
                    <div class="fastpay_box">
                        <div class="tk_jr fl">
                            <span class="text fs14 w100 tar"><b>存款金额：</b></span>
                            <span class="input">
                                <input type="text" name="depositMoney" placeholder="金额"
                                       class="r_inptut inputwd300 deposit-money" maxlength="8"/>
                            </span>
                        </div>
                        <div class="tk_ts clear" style=" margin-top:0px;">
                            <span class="text">存款每次最低50</span>
                        </div>
                        <div class="tk_num clear m20t" style="text-align:left">
                            <span><b>100</b><b>500</b><b>1000</b><b>2000</b></span>
                        </div>
                        <input th:value="${item.depositChannelId}" hidden name="depositChannelId"/>
                        <input name="bankCode" value="" hidden/>
                        <button type="button" class="as_but inputwd300" style="margin-left:0px;"
                                th:onclick="'javascript:submitDeposit('+${item.depositChannelId}+');'">
                            立即存款
                        </button>
                    </div>
                </form>
            </div>

            <!-- 微信方式内容 -->
            <div id="deposit_maintain" class="deposit_not_available"
                 th:style="${depositChannelList.alipayType} ? 'display:none;' : 'display:block;'"
                 th:if="${depositChannelList.wechatType}"
                 th:each="item,iterStat:${depositChannelList.wechatPayData}">
                <form th:id="'depositFrom' + ${item.depositChannelId}">
                    <div class="fastpay_box">
                        <div class="tk_jr fl">
                            <span class="text fs14 w100 tar"><b>存款金额：</b></span>
                            <span class="input">
                                <input type="text" name="depositMoney" placeholder="金额"
                                       class="r_inptut inputwd300 deposit-money" maxlength="8"/>
                            </span>
                        </div>
                        <div class="tk_ts clear" style=" margin-top:0px;">
                            <span class="text">存款每次最低50</span>
                        </div>
                        <div class="tk_num clear m20t" style="text-align:left">
                            <span><b>100</b><b>500</b><b>1000</b><b>2000</b></span>
                        </div>
                        <input th:value="${item.depositChannelId}" hidden name="depositChannelId"/>
                        <input name="bankCode" value="" hidden/>
                        <button type="button" class="as_but inputwd300" style="margin-left:0px;"
                                th:onclick="'javascript:submitDeposit('+${item.depositChannelId}+');'">
                            立即存款
                        </button>
                    </div>
                </form>
            </div>
        </div>

        <!-- 存款订单提交后的Dialog弹窗状态 -->
        <div class="dialog dialogtrade" id="dialog-trade" style="perspective: 1000px;">
            <div class="mover-wrap dialog__content" style="transform-style: preserve-3d;">
                <div class="mover">
                    <div class="dialog__content-inner">
                        <div class="dialog__header">
                            <h2>订单已提交
                                <button class="action action--close">
                                    <i class="icon--cross">×</i>
                                </button>
                            </h2>
                        </div>
                        <div class="dialog__body">
                            <div class="actions">
                                <div class="mover__element">
                                    <section class="action">
                                        <ul class="binding_cont bpstep1">
                                            <li class=""><img src="/images/loading_orange.gif"></li>
                                            <li class=""><strong>请在第三方页面进行操作，谢谢</strong></li>
                                            <li class=""><span>请根据当前情况点击下面按钮</span></li>
                                            <li class="binding_butt"><a href="javascript:goSubmit();"
                                                                        class="btnblue130">已成功充值</a><a
                                                    href="javascript:cancelDeposit();" class="btndigtr2 btnblue130 ">取消充值</a>
                                            </li>
                                        </ul>
                                    </section>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <link rel="stylesheet" href="/js/loading/loading.css">
        <script src="/js/loading/loading.js"></script>
        <script th:inline="javascript">
            var depositChannelList = [[${depositChannelList}]];
            console.log(depositChannelList);
        </script>
        <script>
            var jiuXiuLoad = new Loading();
            jiuXiuLoad.init();

            if (depositChannelList.onlineType) {
                $.ajax({
                    method: "POST",
                    url: "/api/getChannelBanksById",
                    data: {depositChannelId: depositChannelList.onlinePayData[0].depositChannelId},
                    dataType: "json"
                }).done(function (msg) {
                    if (msg.status == 'success') {
                        var tempHtml = "";
                        for (var i = 0; i < msg.data.length; i++) {
                            if (i > 3) {
                                tempHtml += "<span class='otherbank' style='display: none'>";
                            }
                            tempHtml += "<label";
                            if (i == 0) {
                                tempHtml += " class='on'";
                            }
                            tempHtml += "><input type='radio' name='bankCode' value='" + msg.data[i].bankCode + "' ";
                            if (i == 0) {
                                tempHtml += " checked='checked'";
                            }
                            tempHtml += "><b><i class='deposit_atmsel_icon_i " + msg.data[i].bankCode + "'><img></i>" + msg.data[i].bankName + "</b></label>";
                        }
                        if (msg.data.length > 4) {
                            tempHtml += "</span>"
                            $(".morebank").show();
                        } else {
                            $(".morebank").hide();
                        }
                        $("#bankList").html(tempHtml);
                    } else {
                        alertWorning(msg.data);
                    }
                });
            }

            if (depositChannelList.offlinePayData.length > 0) {
                $(".htk01").html(depositChannelList.offlinePayData[0].offlineBankName);
                //$("#currtSelectBank").html(depositChannelList.offlinePayData[0].offlineBankName);
            }

            $("#slectBank").click(function () {
                $(".htk01").hide();
                $(".htk02").show();

                $(this).hide();
                $("#selectBack").show();
            });

            $("#selectBack").click(function () {
                $(".htk01").show();
                $(".htk02").hide();

                $(this).hide();
                $("#slectBank").show();
            });

            $('.as_cn .as_triangle_down').click(function () {
                $(this).addClass('zx_icon').siblings().removeClass('zx_icon');
                $('.as_fr80 .deposit_not_available').eq($(this).index()).siblings().hide().end().show();
            });

            $(".fastpay_box").find("b").click(function () {
                var amountMoney = $(this).text();
                $(this).parent().parent().parent().find("input[name='depositMoney']").val(amountMoney);
            });

            function submitDeposit(depositChannelId) {
                var currtThis = $("#depositFrom" + depositChannelId);
                var inputObj = currtThis.children().find("input[name='depositMoney']");
                if (inputObj.val().length == 0) {
                    alertWorning('请输入你的存款金额!');
                    return;
                }

                jiuXiuLoad.start();
                $.ajax({
                    method: "POST",
                    url: "/api/addOnlineDepositOrder",
                    data: currtThis.serializeArray(),
                    dataType: 'json'
                }).done(function (data) {
                    jiuXiuLoad.stop();
                    if (data.status == 'success') {
                        currtThis[0].reset();
                        $("#dialog-trade").addClass("dialog--open");
                        var win = window.open();
                        win.document.open("text/html", "replace");
                        win.document.write(data.data);
                        win.document.close();
                    } else {
                        alertWorning(data.data);
                    }
                });
            }

            function submitOfflineDeposit(depositChannelId) {
                var currtThis = $("#depositFromOffline");
                var inputObj = currtThis.children().find("input[name='depositMoney']");
                if (inputObj.val().length == 0) {
                    alertWorning('请输入你的存款金额!');
                    return;
                }
                var depositName = currtThis.children().find("input[name='depositName']");
                if (depositName.val().length == 0) {
                    alertWorning('请输入存款人!');
                    return;
                }
                var depositAccount = currtThis.children().find("input[name='depositAccount']");
                if (depositAccount.val().length == 0) {
                    alertWorning('请输入银行账户!');
                    return;
                }
                var depositBank = currtThis.children().find("input[name='depositBank']");
                if (depositBank.val().length == 0) {
                    alertWorning('请输入汇款人银行!');
                    return;
                }

                jiuXiuLoad.start();
                $.ajax({
                    method: "POST",
                    url: "/api/addOfflineDepositOrder",
                    data: currtThis.serializeArray(),
                    dataType: 'json'
                }).done(function (data) {
                    jiuXiuLoad.stop();
                    if (data.status == 'success') {
                        currtThis[0].reset();
                        alertGood(data.data == null ? "提交成功" : data.data);
                    } else {
                        alertWorning(data.data == null ? "提交失败" : data.data);
                    }
                });
            }

            $("#acceptBankSel").change(function () {
                $("#offlineDepositChannelId").val($(this).children('option:selected').attr("data-depositChannelId"));
                $("#acceptName").html($(this).children('option:selected').attr("data-accountName"));
                $("#acceptAccount").html($(this).children('option:selected').attr("data-bankNo"));

                $(".htk01").html($(this).val());
                //$("#currtSelectBank").html($(this).val());

                $(".htk01").show();
                $(".htk02").hide();
                $("#selectBack").show();
            });

            $('.fastpay_box').on('click', '.radio label', function (ev) {
                if ($(this).parent().hasClass("radio")) {
                    $(this).parent().children("span.otherbank").children().siblings().find('input').attr("checked", false);
                    $(this).parent().children("span.otherbank").children().siblings().removeClass("on");
                } else {
                    $(this).parent().parent().children().siblings().find('input').attr("checked", false);
                    $(this).parent().parent().children().siblings().removeClass("on");
                }

                $(this).find('input').attr("checked", 'checked').parent().siblings().find('input').attr("checked", false);
                $(this).siblings().removeClass("on");

                $(this).addClass('on');
            });

            $(".morebank").click(function () {
                $(".otherbank").slideToggle("slow");
                var data = $(this).attr("data");
                if (data == 'hide') {
                    $(this).attr('style', 'background-image: url(images/souqi.png);');
                    $(this).attr("data", "show");
                } else {
                    $(this).attr('style', 'background-image: url(images/hyw06.jpg);');
                    $(this).attr("data", "hide");
                }
            });

            function goSubmit() {
                $("#dialog-trade").removeClass("dialog--open");
                alertGood("交易成功，请尽情游戏！")
                setTimeout(function () {
                    window.location.reload();
                }, 5000);
            }


            function cancelDeposit() {
                $("#dialog-trade").removeClass("dialog--open");
                alertEroor("交易失败，请确认充值流程正确，或联系客服。");
                setTimeout(function () {
                    window.location.reload();
                }, 5000);
            }

            $("#dialog-trade .action--close").click(function () {
                $("#dialog-trade").removeClass("dialog--open");
            });

            if ($("#zryl-jxg-index").attr("href").length <= 0) {
                jiuXiuLoad.start();
                $.ajax({
                    method: "POST",
                    url: "/api/loginGameSubmit",
                    data: {},
                    dataType: "json"
                }).done(function (msg) {
                    jiuXiuLoad.stop();
                    if (msg.status == 'success') {
                        $("#zryl-jxg-index").attr("href", msg.data.hgGameLobbyUrl);
                    } else {
                        alertWorning(msg.data);
                    }
                });
            }
        </script>
    </div>
</div>
</body>
</html>